.class public Les/c90;
.super Ljava/lang/Object;
.source "FileShareServer.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/c90$j;,
        Les/c90$k;,
        Les/c90$i;
    }
.end annotation


# static fields
.field private static f:Ljava/net/ServerSocket; = null

.field public static g:I = 0xa497

.field public static h:Ljava/lang/String; = "ESuser"

.field private static i:Lcom/estrongs/android/pop/zeroconf/h;

.field private static j:Landroid/content/BroadcastReceiver;

.field private static k:Ljava/lang/Object;

.field private static l:Les/c90;


# instance fields
.field private a:Ljava/net/Socket;

.field private b:Ljava/io/DataInputStream;

.field private c:Ljava/io/DataOutputStream;

.field private d:Ljava/lang/String;

.field private e:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    sput-object v0, Les/c90;->k:Ljava/lang/Object;

    return-void
.end method

.method private constructor <init>(Ljava/lang/String;)V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/net/UnknownHostException;,
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Les/c90;->a:Ljava/net/Socket;

    .line 3
    iput-object v0, p0, Les/c90;->b:Ljava/io/DataInputStream;

    .line 4
    iput-object v0, p0, Les/c90;->c:Ljava/io/DataOutputStream;

    .line 5
    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Les/c90;->d:Ljava/lang/String;

    .line 6
    invoke-static {}, Lcom/estrongs/android/pop/c;->b()Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Les/c90;->e:Ljava/lang/String;

    if-eqz p1, :cond_0

    .line 7
    sput-object p1, Les/c90;->h:Ljava/lang/String;

    .line 8
    :cond_0
    new-instance p1, Ljava/net/ServerSocket;

    sget v1, Les/c90;->g:I

    const/16 v2, 0xa

    invoke-direct {p1, v1, v2, v0}, Ljava/net/ServerSocket;-><init>(IILjava/net/InetAddress;)V

    sput-object p1, Les/c90;->f:Ljava/net/ServerSocket;

    .line 9
    new-instance p1, Les/c90$a;

    invoke-direct {p1, p0}, Les/c90$a;-><init>(Les/c90;)V

    .line 10
    invoke-virtual {p1}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/zeroconf/h;)Lcom/estrongs/android/pop/zeroconf/h;
    .locals 0

    .line 4
    sput-object p0, Les/c90;->i:Lcom/estrongs/android/pop/zeroconf/h;

    return-object p0
.end method

.method public static a(Ljava/lang/String;)Les/c90;
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 22
    sget-object v0, Les/c90;->k:Ljava/lang/Object;

    monitor-enter v0

    .line 23
    :try_start_0
    sget-object v1, Les/c90;->l:Les/c90;

    if-eqz v1, :cond_0

    .line 24
    sget-object p0, Les/c90;->l:Les/c90;

    monitor-exit v0

    return-object p0

    .line 25
    :cond_0
    sget-object v1, Les/c90;->f:Ljava/net/ServerSocket;

    if-eqz v1, :cond_1

    const/4 p0, 0x0

    .line 26
    monitor-exit v0

    return-object p0

    .line 27
    :cond_1
    new-instance v1, Les/c90;

    invoke-direct {v1, p0}, Les/c90;-><init>(Ljava/lang/String;)V

    sput-object v1, Les/c90;->l:Les/c90;

    .line 28
    new-instance p0, Les/c90$b;

    invoke-direct {p0}, Les/c90$b;-><init>()V

    sput-object p0, Les/c90;->j:Landroid/content/BroadcastReceiver;

    .line 29
    new-instance p0, Landroid/content/IntentFilter;

    invoke-direct {p0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "android.intent.action.SCREEN_OFF"

    .line 30
    invoke-virtual {p0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "android.intent.action.SCREEN_ON"

    .line 31
    invoke-virtual {p0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"

    .line 32
    invoke-virtual {p0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "android.net.wifi.WIFI_AP_STATE_CHANGED"

    .line 33
    invoke-virtual {p0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 34
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    sget-object v2, Les/c90;->j:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2, p0}, Landroid/app/Application;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 35
    sget-object p0, Les/c90;->l:Les/c90;

    monitor-exit v0

    return-object p0

    :catchall_0
    move-exception p0

    .line 36
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw p0
.end method

.method static synthetic a(Les/c90;Ljava/io/DataInputStream;)Ljava/io/DataInputStream;
    .locals 0

    .line 8
    iput-object p1, p0, Les/c90;->b:Ljava/io/DataInputStream;

    return-object p1
.end method

.method static synthetic a(Les/c90;Ljava/io/DataOutputStream;)Ljava/io/DataOutputStream;
    .locals 0

    .line 9
    iput-object p1, p0, Les/c90;->c:Ljava/io/DataOutputStream;

    return-object p1
.end method

.method static synthetic a(Les/c90;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 7
    iput-object p1, p0, Les/c90;->e:Ljava/lang/String;

    return-object p1
.end method

.method public static a(Ljava/io/InputStream;)Ljava/lang/String;
    .locals 8
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/16 v0, 0x80

    new-array v0, v0, [B

    .line 37
    array-length v1, v0

    const/4 v2, 0x0

    const/4 v3, 0x0

    .line 38
    :goto_0
    invoke-virtual {p0}, Ljava/io/InputStream;->read()I

    move-result v4

    const/4 v5, -0x1

    if-eq v4, v5, :cond_3

    const/16 v6, 0xa

    if-eq v4, v6, :cond_3

    const/16 v7, 0xd

    if-eq v4, v7, :cond_1

    add-int/2addr v1, v5

    if-gez v1, :cond_0

    add-int/lit16 v1, v3, 0x80

    .line 39
    new-array v5, v1, [B

    sub-int/2addr v1, v3

    add-int/lit8 v1, v1, -0x1

    .line 40
    invoke-static {v0, v2, v5, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    move-object v0, v5

    :cond_0
    add-int/lit8 v5, v3, 0x1

    int-to-byte v4, v4

    .line 41
    aput-byte v4, v0, v3

    move v3, v5

    goto :goto_0

    .line 42
    :cond_1
    invoke-virtual {p0}, Ljava/io/InputStream;->read()I

    move-result p0

    if-eq p0, v6, :cond_3

    if-ne p0, v5, :cond_2

    goto :goto_1

    .line 43
    :cond_2
    new-instance p0, Ljava/io/IOException;

    const-string v0, "Line reading error:no \\n!"

    invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p0

    :cond_3
    :goto_1
    if-ne v4, v5, :cond_5

    if-eqz v3, :cond_4

    goto :goto_2

    .line 44
    :cond_4
    new-instance p0, Ljava/io/IOException;

    const-string v0, "Line reading error: socket read error!"

    invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p0

    .line 45
    :cond_5
    :goto_2
    new-instance p0, Ljava/lang/String;

    invoke-direct {p0, v0, v2, v3}, Ljava/lang/String;-><init>([BII)V

    return-object p0
.end method

.method static synthetic a()Ljava/net/ServerSocket;
    .locals 1

    .line 3
    sget-object v0, Les/c90;->f:Ljava/net/ServerSocket;

    return-object v0
.end method

.method static synthetic a(Les/c90;)Ljava/net/Socket;
    .locals 0

    .line 1
    iget-object p0, p0, Les/c90;->a:Ljava/net/Socket;

    return-object p0
.end method

.method static synthetic a(Les/c90;Ljava/net/Socket;)Ljava/net/Socket;
    .locals 0

    .line 2
    iput-object p1, p0, Les/c90;->a:Ljava/net/Socket;

    return-object p1
.end method

.method private a(Landroid/app/Activity;ILjava/lang/String;Les/o70$d;)V
    .locals 6

    .line 52
    new-instance p2, Les/c90$k;

    iget-object v3, p0, Les/c90;->e:Ljava/lang/String;

    new-instance v4, Les/c90$f;

    invoke-direct {v4, p0}, Les/c90$f;-><init>(Les/c90;)V

    move-object v0, p2

    move-object v1, p0

    move-object v2, p1

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Les/c90$k;-><init>(Les/c90;Landroid/app/Activity;Ljava/lang/String;Lcom/estrongs/fs/h;Les/o70$d;)V

    .line 53
    invoke-virtual {p2, p3}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/CharSequence;)V

    const p3, 0x7f110299

    .line 54
    invoke-virtual {p1, p3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p3

    const/4 p4, 0x0

    .line 55
    invoke-virtual {p2, p3, p4}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    const p3, 0x7f11029e

    .line 56
    invoke-virtual {p1, p3}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p1

    .line 57
    invoke-virtual {p2, p1, p2}, Lcom/estrongs/android/widget/c;->b(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 58
    invoke-virtual {p2, p2}, Lcom/estrongs/android/widget/c;->a(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 59
    invoke-virtual {p2}, Lcom/estrongs/android/widget/c;->n()V

    return-void
.end method

.method private a(Lcom/estrongs/android/pop/app/filetransfer/f$c;Ljava/lang/String;)V
    .locals 3

    .line 60
    :try_start_0
    iput-object p2, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->b:Ljava/lang/String;

    .line 61
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/pop/app/filetransfer/f;->a(Landroid/app/Activity;)Lcom/estrongs/android/pop/app/filetransfer/f;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/estrongs/android/pop/app/filetransfer/f;->b(Ljava/lang/Object;)V

    .line 62
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object v0

    const/4 v1, 0x1

    iget-object v2, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->h:Ljava/lang/String;

    invoke-static {v0, v1, p2, v2}, Lcom/estrongs/android/pop/app/filetransfer/FileTransferProcessActivity;->a(Landroid/content/Context;ZLjava/lang/String;Ljava/lang/String;)V

    .line 63
    iget-object p2, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->k:Ljava/net/Socket;

    invoke-virtual {p2}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object p2

    const/16 v0, 0xc8

    const-string v1, "OK"

    invoke-virtual {p0, p2, v0, v1}, Les/c90;->a(Ljava/io/OutputStream;ILjava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p2

    .line 64
    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V

    .line 65
    :try_start_1
    iget-object p1, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->k:Ljava/net/Socket;

    invoke-virtual {p1}, Ljava/net/Socket;->close()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    :catch_1
    :goto_0
    return-void
.end method

.method static synthetic a(Les/c90;Landroid/app/Activity;ILjava/lang/String;Les/o70$d;)V
    .locals 0

    .line 6
    invoke-direct {p0, p1, p2, p3, p4}, Les/c90;->a(Landroid/app/Activity;ILjava/lang/String;Les/o70$d;)V

    return-void
.end method

.method static synthetic a(Les/c90;Lcom/estrongs/android/pop/app/filetransfer/f$c;Ljava/lang/String;)V
    .locals 0

    .line 12
    invoke-direct {p0, p1, p2}, Les/c90;->a(Lcom/estrongs/android/pop/app/filetransfer/f$c;Ljava/lang/String;)V

    return-void
.end method

.method static synthetic a(Les/c90;Ljava/lang/Object;)V
    .locals 0

    .line 10
    invoke-direct {p0, p1}, Les/c90;->a(Ljava/lang/Object;)V

    return-void
.end method

.method static synthetic a(Les/c90;Ljava/lang/Object;Ljava/lang/String;)V
    .locals 0

    .line 13
    invoke-direct {p0, p1, p2}, Les/c90;->a(Ljava/lang/Object;Ljava/lang/String;)V

    return-void
.end method

.method static synthetic a(Les/c90;Ljava/net/Socket;ILjava/lang/String;Z)V
    .locals 0

    .line 5
    invoke-direct {p0, p1, p2, p3, p4}, Les/c90;->a(Ljava/net/Socket;ILjava/lang/String;Z)V

    return-void
.end method

.method private a(Ljava/lang/Object;)V
    .locals 3

    .line 46
    check-cast p1, Les/o70$d;

    .line 47
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object v0

    if-nez v0, :cond_0

    .line 48
    :try_start_0
    iget-object v0, p1, Les/o70$d;->j:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v0

    const/16 v1, 0x194

    const-string v2, "Not found"

    invoke-virtual {p0, v0, v1, v2}, Les/c90;->a(Ljava/io/OutputStream;ILjava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 49
    :catch_0
    :try_start_1
    iget-object p1, p1, Les/o70$d;->j:Ljava/net/Socket;

    invoke-virtual {p1}, Ljava/net/Socket;->close()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    goto :goto_0

    :catchall_0
    move-exception v0

    :try_start_2
    iget-object p1, p1, Les/o70$d;->j:Ljava/net/Socket;

    invoke-virtual {p1}, Ljava/net/Socket;->close()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    .line 50
    :catch_1
    throw v0

    :catch_2
    :goto_0
    return-void

    .line 51
    :cond_0
    new-instance v0, Les/c90$e;

    invoke-direct {v0, p0, p1}, Les/c90$e;-><init>(Les/c90;Les/o70$d;)V

    invoke-static {v0}, Lcom/estrongs/android/util/o0;->a(Ljava/lang/Runnable;)V

    return-void
.end method

.method private a(Ljava/lang/Object;Ljava/lang/String;)V
    .locals 2

    .line 66
    check-cast p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;

    .line 67
    invoke-static {}, Lcom/estrongs/android/pop/esclasses/ESActivity;->z()Landroid/app/Activity;

    move-result-object v0

    if-nez v0, :cond_0

    .line 68
    :try_start_0
    iget-object p2, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->k:Ljava/net/Socket;

    invoke-virtual {p2}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object p2

    const/16 v0, 0x194

    const-string v1, "Not found"

    invoke-virtual {p0, p2, v0, v1}, Les/c90;->a(Ljava/io/OutputStream;ILjava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 69
    :catch_0
    :try_start_1
    iget-object p1, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->k:Ljava/net/Socket;

    invoke-virtual {p1}, Ljava/net/Socket;->close()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    goto :goto_0

    :catchall_0
    move-exception p2

    :try_start_2
    iget-object p1, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->k:Ljava/net/Socket;

    invoke-virtual {p1}, Ljava/net/Socket;->close()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1

    .line 70
    :catch_1
    throw p2

    :catch_2
    :goto_0
    return-void

    .line 71
    :cond_0
    new-instance v0, Les/c90$g;

    invoke-direct {v0, p0, p1, p2}, Les/c90$g;-><init>(Les/c90;Lcom/estrongs/android/pop/app/filetransfer/f$c;Ljava/lang/String;)V

    invoke-static {v0}, Lcom/estrongs/android/util/o0;->a(Ljava/lang/Runnable;)V

    return-void
.end method

.method private a(Ljava/net/Socket;ILjava/lang/String;Z)V
    .locals 7

    if-nez p1, :cond_0

    return-void

    .line 72
    :cond_0
    new-instance v6, Les/c90$h;

    move-object v0, v6

    move-object v1, p0

    move-object v2, p1

    move v3, p2

    move-object v4, p3

    move v5, p4

    invoke-direct/range {v0 .. v5}, Les/c90$h;-><init>(Les/c90;Ljava/net/Socket;ILjava/lang/String;Z)V

    .line 73
    invoke-virtual {v6}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method private a(Lcom/estrongs/android/pop/app/filetransfer/f$c;)Z
    .locals 5

    const-wide/16 v0, 0x0

    .line 74
    :try_start_0
    new-instance v2, Landroid/os/StatFs;

    iget-object v3, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->j:Ljava/lang/String;

    invoke-direct {v2, v3}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V

    .line 75
    invoke-virtual {v2}, Landroid/os/StatFs;->getBlockSize()I

    move-result v3
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    int-to-long v3, v3

    .line 76
    :try_start_1
    invoke-virtual {v2}, Landroid/os/StatFs;->getAvailableBlocks()I

    move-result v0
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    int-to-long v0, v0

    goto :goto_0

    :catch_0
    nop

    goto :goto_0

    :catch_1
    move-wide v3, v0

    :goto_0
    mul-long v3, v3, v0

    .line 77
    iget-wide v0, p1, Lcom/estrongs/android/pop/app/filetransfer/f$c;->f:J

    cmp-long p1, v0, v3

    if-lez p1, :cond_0

    const/4 p1, 0x0

    return p1

    :cond_0
    const/4 p1, 0x1

    return p1
.end method

.method static synthetic a(Les/c90;Lcom/estrongs/android/pop/app/filetransfer/f$c;)Z
    .locals 0

    .line 11
    invoke-direct {p0, p1}, Les/c90;->a(Lcom/estrongs/android/pop/app/filetransfer/f$c;)Z

    move-result p0

    return p0
.end method

.method static synthetic b(Les/c90;)Ljava/lang/String;
    .locals 0

    .line 2
    iget-object p0, p0, Les/c90;->e:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic b()V
    .locals 0

    .line 1
    invoke-static {}, Les/c90;->f()V

    return-void
.end method

.method static synthetic c(Les/c90;)Ljava/io/DataInputStream;
    .locals 0

    .line 2
    iget-object p0, p0, Les/c90;->b:Ljava/io/DataInputStream;

    return-object p0
.end method

.method static synthetic c()Ljava/lang/Object;
    .locals 1

    .line 1
    sget-object v0, Les/c90;->k:Ljava/lang/Object;

    return-object v0
.end method

.method static synthetic d()Lcom/estrongs/android/pop/zeroconf/h;
    .locals 1

    .line 1
    sget-object v0, Les/c90;->i:Lcom/estrongs/android/pop/zeroconf/h;

    return-object v0
.end method

.method static synthetic d(Les/c90;)Ljava/io/DataOutputStream;
    .locals 0

    .line 2
    iget-object p0, p0, Les/c90;->c:Ljava/io/DataOutputStream;

    return-object p0
.end method

.method static synthetic e(Les/c90;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Les/c90;->d:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic e()V
    .locals 0

    .line 2
    invoke-static {}, Les/c90;->g()V

    return-void
.end method

.method private static f()V
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Les/c90$d;

    invoke-direct {v1}, Les/c90$d;-><init>()V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 2
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method private static g()V
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Les/c90$c;

    invoke-direct {v1}, Les/c90$c;-><init>()V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 2
    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method public static h()V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    sget-object v0, Les/c90;->k:Ljava/lang/Object;

    monitor-enter v0

    .line 2
    :try_start_0
    sget-object v1, Les/c90;->l:Les/c90;

    if-nez v1, :cond_0

    .line 3
    monitor-exit v0

    return-void

    .line 4
    :cond_0
    sget-object v1, Les/c90;->f:Ljava/net/ServerSocket;

    if-nez v1, :cond_1

    .line 5
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    return-void

    .line 6
    :cond_1
    :try_start_1
    sget-object v1, Les/c90;->f:Ljava/net/ServerSocket;

    invoke-virtual {v1}, Ljava/net/ServerSocket;->close()V
    :try_end_1
    .catch Ljava/lang/Error; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :catch_0
    const/4 v1, 0x0

    .line 7
    :try_start_2
    sput-object v1, Les/c90;->f:Ljava/net/ServerSocket;

    .line 8
    sput-object v1, Les/c90;->l:Les/c90;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 9
    :try_start_3
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v1

    sget-object v2, Les/c90;->j:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2}, Landroid/app/Application;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 10
    :catch_1
    :try_start_4
    monitor-exit v0
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 11
    invoke-static {}, Les/c90;->f()V

    return-void

    :catchall_0
    move-exception v1

    .line 12
    :try_start_5
    monitor-exit v0
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    throw v1
.end method


# virtual methods
.method public a(Ljava/io/OutputStream;ILjava/lang/String;)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    const/16 v0, 0xc8

    if-ne p2, v0, :cond_0

    const-string p2, "HTTP/1.1 200 OK\r\n"

    goto :goto_0

    :cond_0
    const-string p2, "HTTP/1.1 404 Not Found\r\n"

    .line 14
    :goto_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Content-Length: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/String;->length()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, "\r\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 15
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    const-string p2, "Server: ES Name Response Server\r\n"

    .line 16
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    const-string p2, "Content-Type: text/html\r\n"

    .line 17
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    .line 18
    invoke-virtual {v0}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    const-string p2, "Connection: close\r\n"

    .line 19
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    .line 20
    invoke-virtual {v1}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    .line 21
    invoke-virtual {p3}, Ljava/lang/String;->getBytes()[B

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/io/OutputStream;->write([B)V

    return-void
.end method
